Skip to content

Add comprehensive test suite (271 tests)#8

Merged
CoderJoeW merged 2 commits intomainfrom
feature/test-suite
Mar 5, 2026
Merged

Add comprehensive test suite (271 tests)#8
CoderJoeW merged 2 commits intomainfrom
feature/test-suite

Conversation

@CoderJoeW
Copy link
Copy Markdown
Owner

Summary

  • Add 271 unit and integration tests across 25 test files, covering all 27 source files
  • Add JUnit 5 + MockK test dependencies and maven-surefire-plugin configuration
  • Add testPlugin companion object hooks to PowerBlock and FluidBlock to enable testing without a Minecraft server or Nexo plugin

Coverage

Power system (11 test files): block logic (solar panel, battery, cable, drill), registry, factory, data serialization, persistence, listener events, dialog rendering, drill mining mechanics, network integration

Fluid system (10 test files): block logic (pump, pipe), registry, factory, data serialization, persistence, listener events, dialog rendering, network integration, FluidType enum

Plugin & cross-system (4 test files): Atlas plugin lifecycle, resource pack manager, Nexo integration, player join listener, power-to-fluid cross-system integration with complete pipeline tests

Production changes

  • PowerBlock.kt / FluidBlock.kt: Changed plugin from eagerly-initialized val to computed get() property with testPlugin hook — no behavioral change at runtime
  • pom.xml: Added test-scoped dependencies (JUnit 5, MockK) and surefire plugin

Add JUnit 5 and MockK test dependencies with surefire plugin configuration.
Add testPlugin hooks to PowerBlock and FluidBlock to enable unit testing
without a running Minecraft server or Nexo plugin.

Test coverage spans all 27 source files across 25 test files:
- Power system: logic, registry, factory, data, persistence, listener,
  dialog, drill mining, network integration
- Fluid system: logic, registry, factory, data, persistence, listener,
  dialog, network integration
- Cross-system: power-to-fluid integration, complete pipeline tests
- Plugin lifecycle, resource pack manager, Nexo integration
@CoderJoeW CoderJoeW merged commit db7dc14 into main Mar 5, 2026
1 check passed
@CoderJoeW CoderJoeW deleted the feature/test-suite branch March 15, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant